/*
 * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef SLE_LOADER_HAL_H
#define SLE_LOADER_HAL_H

#ifndef SLE_LOG_TAG
#define SLE_LOG_TAG "[SleHal]"
#endif

#include "sle_adapter_hdi.h"
#include "sle_host_hdi.h"
#include "sle_announce_hdi.h"
#include "sle_seek_hdi.h"
#include "sle_connect_hdi.h"
#include "sle_ssap_client_hdi.h"
#include "sle_ssap_server_hdi.h"
#include <stdio.h>
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief: Initialize the SLE HAL
 * 
 * @param: None
 * @return: SleHalErrorCode
 */
SleHalErrorCode InitSleHal(void);

/**
 * @brief: Deinitialize the SLE HAL
 * 
 * @param: None
 * @return: SleHalErrorCode
 */
SleHalErrorCode DeinitSleHal(void);

/**
 * @brief:  host hal use it to get hostOpts
 * 
 * @param:  [out] hostOp - Host HAL options
 * @return: SleHalErrorCode
 * 
 * @note:  hostOp should be input as NULL, and no need to be released by user 
 */
SleHalErrorCode GetSleHostHalOpts(SleHostHdiOpts *hostOp);

/**
 * @brief:  seek hal use it to get seekOpts
 * 
 * @param:  [out] seekOp - Seek HAL options
 * @return: SleHalErrorCode
 * 
 * @note:   sleSeekOpts should be input as NULL, and no need to be released by user 
 */
SleHalErrorCode GetSleSeekHalOpts(SleSeekHdiOpts *sleSeekOpts);

/**
 * @brief:  announce hal use it to get announceOpts
 * 
 * @param:  [out] announceOp - Announce HAL options
 * @return: SleHalErrorCode
 * 
 * @note:   sleAnnounce should be input as NULL, and no need to be released by user 
 */
SleHalErrorCode GetSleAnnounceHalOpts(SleAnnounceHdiOpts *sleAnnounce);

/**
 * @brief:  connect hal use it to get connectOpts
 * 
 * @param:  [out] connectOp - Connect HAL options
 * @return: SleHalErrorCode
 * @note:   sleConnectOpts should be input as NULL, and no need to be released by user 
 */
SleHalErrorCode GetSleConnectHalOpts(SleConnectHdiOpts *sleConnectOpts);

/**
 * @brief:  ssapc hal use it to get ssapcOpts
 * 
 * @param:  [out] ssapcOp - SSAPC HAL options
 * @return: SleHalErrorCode
 * @note:   sleSsapcOpts should be input as NULL, and no need to be released by user 
 */
SleHalErrorCode GetSleSsapcHalOpts(SleSsapcHdiOpts *sleSsapcOpts);

/**
 * @brief:  ssaps hal use it to get ssapsOpts
 * 
 * @param:  [out] ssapsOp - SSAPS HAL options
 * @return: SleHalErrorCode
 * @note:   sleSsapsOpts should be input as NULL, and no need to be released by user 
 */
SleHalErrorCode GetSleSsapsHalOpts(SleSsapsHdiOpts *sleSsapsOpts);

#ifdef __cplusplus
}
#endif

#endif //SLE_LOADER_HAL_H


